3.20 \(\int \frac {x}{a+b \text {sech}(c+d x^2)} \, dx\)

Optimal. Leaf size=66 \[ \frac {x^2}{2 a}-\frac {b \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^2\right )\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}} \]

[Out]

1/2*x^2/a-b*arctan((a-b)^(1/2)*tanh(1/2*d*x^2+1/2*c)/(a+b)^(1/2))/a/d/(a-b)^(1/2)/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5436, 3783, 2659, 208} \[ \frac {x^2}{2 a}-\frac {b \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^2\right )\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}} \]

Antiderivative was successfully verified.

[In]

Int[x/(a + b*Sech[c + d*x^2]),x]

[Out]

x^2/(2*a) - (b*ArcTan[(Sqrt[a - b]*Tanh[(c + d*x^2)/2])/Sqrt[a + b]])/(a*Sqrt[a - b]*Sqrt[a + b]*d)

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 3783

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(-1), x_Symbol] :> Simp[x/a, x] - Dist[1/a, Int[1/(1 + (a*Sin[c + d
*x])/b), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]

Rule 5436

Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Sech[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {x}{a+b \text {sech}\left (c+d x^2\right )} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{a+b \text {sech}(c+d x)} \, dx,x,x^2\right )\\ &=\frac {x^2}{2 a}-\frac {\operatorname {Subst}\left (\int \frac {1}{1+\frac {a \cosh (c+d x)}{b}} \, dx,x,x^2\right )}{2 a}\\ &=\frac {x^2}{2 a}+\frac {i \operatorname {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,i \tanh \left (\frac {1}{2} \left (c+d x^2\right )\right )\right )}{a d}\\ &=\frac {x^2}{2 a}-\frac {b \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^2\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 67, normalized size = 1.02 \[ \frac {\frac {2 b \tan ^{-1}\left (\frac {(b-a) \tanh \left (\frac {1}{2} \left (c+d x^2\right )\right )}{\sqrt {a^2-b^2}}\right )}{d \sqrt {a^2-b^2}}+\frac {c}{d}+x^2}{2 a} \]

Antiderivative was successfully verified.

[In]

Integrate[x/(a + b*Sech[c + d*x^2]),x]

[Out]

(c/d + x^2 + (2*b*ArcTan[((-a + b)*Tanh[(c + d*x^2)/2])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*d))/(2*a)

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 304, normalized size = 4.61 \[ \left [\frac {{\left (a^{2} - b^{2}\right )} d x^{2} - \sqrt {-a^{2} + b^{2}} b \log \left (\frac {a^{2} \cosh \left (d x^{2} + c\right )^{2} + a^{2} \sinh \left (d x^{2} + c\right )^{2} + 2 \, a b \cosh \left (d x^{2} + c\right ) - a^{2} + 2 \, b^{2} + 2 \, {\left (a^{2} \cosh \left (d x^{2} + c\right ) + a b\right )} \sinh \left (d x^{2} + c\right ) + 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cosh \left (d x^{2} + c\right ) + a \sinh \left (d x^{2} + c\right ) + b\right )}}{a \cosh \left (d x^{2} + c\right )^{2} + a \sinh \left (d x^{2} + c\right )^{2} + 2 \, b \cosh \left (d x^{2} + c\right ) + 2 \, {\left (a \cosh \left (d x^{2} + c\right ) + b\right )} \sinh \left (d x^{2} + c\right ) + a}\right )}{2 \, {\left (a^{3} - a b^{2}\right )} d}, \frac {{\left (a^{2} - b^{2}\right )} d x^{2} + 2 \, \sqrt {a^{2} - b^{2}} b \arctan \left (-\frac {a \cosh \left (d x^{2} + c\right ) + a \sinh \left (d x^{2} + c\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )}{2 \, {\left (a^{3} - a b^{2}\right )} d}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(a+b*sech(d*x^2+c)),x, algorithm="fricas")

[Out]

[1/2*((a^2 - b^2)*d*x^2 - sqrt(-a^2 + b^2)*b*log((a^2*cosh(d*x^2 + c)^2 + a^2*sinh(d*x^2 + c)^2 + 2*a*b*cosh(d
*x^2 + c) - a^2 + 2*b^2 + 2*(a^2*cosh(d*x^2 + c) + a*b)*sinh(d*x^2 + c) + 2*sqrt(-a^2 + b^2)*(a*cosh(d*x^2 + c
) + a*sinh(d*x^2 + c) + b))/(a*cosh(d*x^2 + c)^2 + a*sinh(d*x^2 + c)^2 + 2*b*cosh(d*x^2 + c) + 2*(a*cosh(d*x^2
 + c) + b)*sinh(d*x^2 + c) + a)))/((a^3 - a*b^2)*d), 1/2*((a^2 - b^2)*d*x^2 + 2*sqrt(a^2 - b^2)*b*arctan(-(a*c
osh(d*x^2 + c) + a*sinh(d*x^2 + c) + b)/sqrt(a^2 - b^2)))/((a^3 - a*b^2)*d)]

________________________________________________________________________________________

giac [A]  time = 0.17, size = 61, normalized size = 0.92 \[ -\frac {b \arctan \left (\frac {a e^{\left (d x^{2} + c\right )} + b}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} a d} + \frac {d x^{2} + c}{2 \, a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(a+b*sech(d*x^2+c)),x, algorithm="giac")

[Out]

-b*arctan((a*e^(d*x^2 + c) + b)/sqrt(a^2 - b^2))/(sqrt(a^2 - b^2)*a*d) + 1/2*(d*x^2 + c)/(a*d)

________________________________________________________________________________________

maple [A]  time = 0.25, size = 95, normalized size = 1.44 \[ -\frac {\ln \left (\tanh \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )-1\right )}{2 d a}-\frac {b \arctan \left (\frac {\left (a -b \right ) \tanh \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{d a \sqrt {\left (a +b \right ) \left (a -b \right )}}+\frac {\ln \left (\tanh \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )+1\right )}{2 d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x/(a+b*sech(d*x^2+c)),x)

[Out]

-1/2/d/a*ln(tanh(1/2*d*x^2+1/2*c)-1)-1/d/a*b/((a+b)*(a-b))^(1/2)*arctan((a-b)*tanh(1/2*d*x^2+1/2*c)/((a+b)*(a-
b))^(1/2))+1/2/d/a*ln(tanh(1/2*d*x^2+1/2*c)+1)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(a+b*sech(d*x^2+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more details)Is 4*b^2-4*a^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.18, size = 171, normalized size = 2.59 \[ \frac {x^2}{2\,a}-\frac {\mathrm {atan}\left (\frac {a\,d\,\sqrt {b^2}}{\sqrt {a^4\,d^2-a^2\,b^2\,d^2}}+\frac {b\,{\mathrm {e}}^{d\,x^2}\,{\mathrm {e}}^c\,\sqrt {a^4\,d^2-a^2\,b^2\,d^2}}{a^2\,d\,\sqrt {b^2}}+\frac {a^2\,b\,d\,{\mathrm {e}}^{d\,x^2}\,{\mathrm {e}}^c\,\sqrt {b^2}\,\sqrt {a^4\,d^2-a^2\,b^2\,d^2}}{a^6\,d^2-a^4\,b^2\,d^2}\right )\,\sqrt {b^2}}{\sqrt {a^4\,d^2-a^2\,b^2\,d^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x/(a + b/cosh(c + d*x^2)),x)

[Out]

x^2/(2*a) - (atan((a*d*(b^2)^(1/2))/(a^4*d^2 - a^2*b^2*d^2)^(1/2) + (b*exp(d*x^2)*exp(c)*(a^4*d^2 - a^2*b^2*d^
2)^(1/2))/(a^2*d*(b^2)^(1/2)) + (a^2*b*d*exp(d*x^2)*exp(c)*(b^2)^(1/2)*(a^4*d^2 - a^2*b^2*d^2)^(1/2))/(a^6*d^2
 - a^4*b^2*d^2))*(b^2)^(1/2))/(a^4*d^2 - a^2*b^2*d^2)^(1/2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x}{a + b \operatorname {sech}{\left (c + d x^{2} \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(a+b*sech(d*x**2+c)),x)

[Out]

Integral(x/(a + b*sech(c + d*x**2)), x)

________________________________________________________________________________________